/*
 Navicat Premium Data Transfer

 Source Server         : 127.0.0.1
 Source Server Type    : MySQL
 Source Server Version : 80016
 Source Host           : 127.0.0.1:3306
 Source Schema         : community_service

 Target Server Type    : MySQL
 Target Server Version : 80016
 File Encoding         : 65001

 Date: 22/03/2021 14:39:17
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for db_daily_health_card
-- ----------------------------
DROP TABLE IF EXISTS `db_daily_health_card`;
CREATE TABLE `db_daily_health_card` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
  `user_id` int(11) DEFAULT NULL COMMENT '用户id',
  `user_nickname` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '用户名称',
  `card_date` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '打卡日期',
  `current_health_status` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '目前健康状况',
  `current_city` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '目前所在城市',
  `whether_you_contact_hubei` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '是否接触湖北人',
  `whether_youtouching_new_crown` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '是否接触新冠',
  `status` int(11) DEFAULT '0' COMMENT '状态',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT COMMENT='每日健康打卡';

-- ----------------------------
-- Records of db_daily_health_card
-- ----------------------------
BEGIN;
INSERT INTO `db_daily_health_card` VALUES (1, 1, '陈伟龙', '2021-03-22', '良好', '杭州', '没有', '否', 0, '2021-03-22 11:39:11', '2021-03-22 11:39:11');
COMMIT;

-- ----------------------------
-- Table structure for db_one_click_alarm
-- ----------------------------
DROP TABLE IF EXISTS `db_one_click_alarm`;
CREATE TABLE `db_one_click_alarm` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
  `user_id` int(11) DEFAULT NULL COMMENT '用户id',
  `user_nickname` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '用户昵称',
  `alarm_address` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '报警地址',
  `longitude` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '经度',
  `latitude` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '纬度',
  `status` int(11) DEFAULT NULL COMMENT '报警状态',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT COMMENT='一键报警';

-- ----------------------------
-- Records of db_one_click_alarm
-- ----------------------------
BEGIN;
INSERT INTO `db_one_click_alarm` VALUES (1, 1, '陈伟龙', '河南省-周口市-太康县-高贤乡', '30', '120', 0, '2021-03-21 14:00:12', '2021-03-21 14:00:12');
COMMIT;

-- ----------------------------
-- Table structure for db_questionnaire
-- ----------------------------
DROP TABLE IF EXISTS `db_questionnaire`;
CREATE TABLE `db_questionnaire` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
  `questionnaire_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '问卷名称',
  `count` int(11) DEFAULT '0' COMMENT '填写次数',
  `questionnaire_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '问卷内容',
  `status` int(11) DEFAULT '0' COMMENT '状态',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT COMMENT='问卷调查表';

-- ----------------------------
-- Records of db_questionnaire
-- ----------------------------
BEGIN;
INSERT INTO `db_questionnaire` VALUES (1, '每日体温登记表', 0, '[{\"index\":1,\"problem\":\"您的楼栋/房号\",\"type\":\"INPUT\",\"typeStr\":\"问答\",\"text\":\"请输入文字\"},{\"index\":2,\"problem\":\"姓名\",\"type\":\"INPUT\",\"typeStr\":\"问答\",\"text\":\"请输入文字\"},{\"index\":3,\"problem\":\"当日体温(摄氏度)\",\"type\":\"INPUT\",\"typeStr\":\"问答\",\"text\":\"请输入文字\"},{\"index\":4,\"problem\":\"有无异常症状\",\"type\":\"RADIO\",\"typeStr\":\"单选\",\"radio\":[\"有\",\"无\"]},{\"index\":5,\"problem\":\"已隔离天数\",\"type\":\"INPUT\",\"typeStr\":\"问答\",\"text\":\"请输入文字\"}]', 0, '2021-03-21 08:08:06', '2021-03-21 08:08:06');
INSERT INTO `db_questionnaire` VALUES (2, '返程人员登记表', 12, '[{\"index\":1,\"problem\":\"您的楼栋/房号\",\"type\":\"INPUT\",\"typeStr\":\"问答\",\"text\":\"请输入文字\"},{\"index\":2,\"problem\":\"姓名\",\"type\":\"INPUT\",\"typeStr\":\"问答\",\"text\":\"请输入文字\"},{\"index\":3,\"problem\":\"当日体温(摄氏度)\",\"type\":\"INPUT\",\"typeStr\":\"问答\",\"text\":\"请输入文字\"},{\"index\":4,\"problem\":\"有无异常症状\",\"type\":\"RADIO\",\"typeStr\":\"单选\",\"radio\":[\"有\",\"无\"]},{\"index\":5,\"problem\":\"已隔离天数\",\"type\":\"INPUT\",\"typeStr\":\"问答\",\"text\":\"请输入文字\"},{\"index\":6,\"problem\":\"返程时乘坐的交通工具\",\"type\":\"CHECKBOX\",\"typeStr\":\"多选\",\"checkbox\":[\"火车\",\"飞机\",\"长途巴士\",\"自驾\",\"其他\"]}]', 0, '2021-03-21 08:08:09', '2021-03-21 08:08:09');
COMMIT;

-- ----------------------------
-- Table structure for db_suggestions
-- ----------------------------
DROP TABLE IF EXISTS `db_suggestions`;
CREATE TABLE `db_suggestions` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
  `user_id` int(11) DEFAULT NULL COMMENT '用户id',
  `user_nickname` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '用户昵称',
  `house_location` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '房屋位置',
  `suggest_type` int(11) DEFAULT '0' COMMENT '建议类型',
  `details` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '详细内容',
  `image` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '图片',
  `status` int(11) DEFAULT NULL COMMENT '状态',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT COMMENT='投诉建议';

-- ----------------------------
-- Records of db_suggestions
-- ----------------------------
BEGIN;
INSERT INTO `db_suggestions` VALUES (1, 1, '陈伟龙', '花园岗公寓3栋2单元1904', 0, '楼上声音太大了', '[\"http://www.baidu.com/img/1\"]', 0, '2021-03-21 14:53:06', '2021-03-21 14:53:06');
INSERT INTO `db_suggestions` VALUES (2, 1, '陈伟龙', '花园岗公寓3栋2单元1904', 0, '楼上声音太大了', '[\"http://www.baidu.com/img/1\",\"http://www.baidu.com/img/1\"]', 0, '2021-03-21 14:53:18', '2021-03-21 14:53:18');
COMMIT;

-- ----------------------------
-- Table structure for db_user
-- ----------------------------
DROP TABLE IF EXISTS `db_user`;
CREATE TABLE `db_user` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '用户id',
  `user_nickname` varchar(25) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '用户昵称',
  `openid` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT 'openid',
  `electricity_fee` decimal(11,2) DEFAULT '0.00' COMMENT '电费',
  `water_fee` decimal(11,2) DEFAULT '0.00' COMMENT '水费',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT COMMENT='用户表';

-- ----------------------------
-- Records of db_user
-- ----------------------------
BEGIN;
INSERT INTO `db_user` VALUES (1, '陈伟龙', 'dfadlkfjalksjfla', 0.00, 0.00, '2021-03-22 06:07:42', '2021-03-22 06:07:42');
COMMIT;

-- ----------------------------
-- Table structure for db_user_questionnaire
-- ----------------------------
DROP TABLE IF EXISTS `db_user_questionnaire`;
CREATE TABLE `db_user_questionnaire` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
  `user_id` int(11) DEFAULT NULL COMMENT '用户id',
  `user_nickname` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '用户名称',
  `questionnaire_id` int(11) DEFAULT NULL COMMENT '问卷id',
  `questionnaire_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT '' COMMENT '问卷名称',
  `fill_in_content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '填写内容',
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=COMPACT COMMENT='用户问卷调查';

-- ----------------------------
-- Records of db_user_questionnaire
-- ----------------------------
BEGIN;
INSERT INTO `db_user_questionnaire` VALUES (2, 1, '陈伟龙', 1, '每日体温登记表', 'eyIxLuaCqOeahOalvOagiy/miL/lj7ciOiIz5qCLMuWNleWFgzE5MDQiLCIyLuWnk+WQjSI6IumZiOS8n+m+mSIsIjMu5b2T5pel5L2T5ripKOaRhOawj+W6pikiOiIzNyIsIjQu5pyJ5peg5byC5bi455eH54q2Ijoi5pegIiwiNS7lt7LpmpTnprvlpKnmlbAiOiIwIn0=', '2021-03-22 10:29:30', '2021-03-22 10:29:30');
COMMIT;

-- ----------------------------
-- Table structure for sys_user
-- ----------------------------
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user` (
  `user_id` bigint(20) NOT NULL AUTO_INCREMENT,
  `username` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户名',
  `password` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '密码',
  `salt` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '盐',
  `email` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '邮箱',
  `mobile` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '手机号',
  `status` tinyint(4) DEFAULT NULL COMMENT '状态  0：禁用   1：正常',
  `type` int(11) DEFAULT NULL COMMENT '创建者ID',
  `create_time` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`user_id`) USING BTREE,
  UNIQUE KEY `username` (`username`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='系统用户';

-- ----------------------------
-- Records of sys_user
-- ----------------------------
BEGIN;
INSERT INTO `sys_user` VALUES (1, 'admin', '123456', NULL, NULL, NULL, NULL, 1, NULL);
INSERT INTO `sys_user` VALUES (2, 'user1', '123456', NULL, NULL, NULL, NULL, 2, NULL);
INSERT INTO `sys_user` VALUES (3, 'user2', '123456', NULL, NULL, NULL, NULL, 3, NULL);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
